<template>
  <div class="demo1">
    <h3>这是第一个Demo</h3>
    <p>我叫{{ name }}，今年{{ age }}岁</p>
    <button @click="changeName">修改姓名</button>
    <button @click="changeAge">修改年龄</button>
  </div>
</template>

<script>
export default {
  name:"Demo1",
  data() {
    return {

      name: "孙悟空",
      age: 500

    }
  },
  methods: {
    changeName() {
      this.name = "唐僧";
    },
    changeAge() {
      this.age = 100;
    },
  }
}
</script>

<style></style>